#ifndef H_STLIS331DLH
#define H_STLIS331DLH

#define STLIS331DLH_REG1            0x20
#define STLIS331DLH_REG4            0x23
//set data acq vel
#define STLIS331DLH_REG1_50         0x27 //50hz
#define STLIS331DLH_REG1_100        0x2F //100hz
#define STLIS331DLH_REG1_1000       0x3F //1000hz
#define STLIS331DLH_REG1_400        0x37 //400hz
#define STLIS331DLH_REG1_DEF        0x2F //100hz
#define STLIS331DLH_ACCX_H          0x29
#define STLIS331DLH_ACCX_L          0x28
#define STLIS331DLH_ACCY_H          0x2B
#define STLIS331DLH_ACCY_L          0x2A
#define STLIS331DLH_ACCZ_H          0x2D
#define STLIS331DLH_ACCZ_L          0x2C


#define STLIS331DLH_2G          0x00
#define STLIS331DLH_4G          0x10
#define STLIS331DLH_8G          0x30

////////////////////////////////////////PUBLIC STRUCTURES/////////////////////////////////////////
typedef struct 
{
	float x; 
	float y; 
	float z;
}S_Acc;


////////////////////////////////////////PUBLIC FUNCTIONS/////////////////////////////////////////
void STLIS331DLHInit( int fd );
void STLIS331DLHRead( int fd , S_Acc * acc);
void STLIS331DLHCalibrate( int fd );
#endif
	
